/*
 *****************************************************************************
 * Copyright 2004-2012 Aiti Ltd. All rights reserved.
 *****************************************************************************
 *  Change Activity:
 *  --------------------------------------------------------------------------
 *  Date      Author          Description
 *  --------------------------------------------------------------------------
 *  Jan 14, 2013 ThinhNV2  Initial Code drop.
 *****************************************************************************
 */
package com.aiti.c1202m.core.logger.log4j;

import org.apache.log4j.Logger;

import com.aiti.c1202m.core.logger.IfLogger;

/**
 * <H3>Log4jLoggerAdapter</H3>
 *
 * @author ThinhNV2
 * @since Jan 14, 2013
 */
public class Log4jLoggerAdapter implements IfLogger {
	private final Logger logger;

//	***** Constructor *****

	/**
	 * only Log4jLoggerFactory calls this constructor.
	 * <p>
	 * load default resource bundle and create Logger instance.
	 * @param className
	 */
	Log4jLoggerAdapter(String className) {
		logger = Logger.getLogger(className);
	}

	//***** Public method *****
	/**
	 * info
	 * @see com.nsk.common.trace.IfLogger#info(java.lang.String)
	 */
	public void info(String message) {
		logger.info(message);
	}

	/**
	 * error
	 * @see com.nsk.common.trace.IfLogger#error(java.lang.String)
	 */
	public void error(String message) {
		logger.error(message);
	}

	/**
	 * debug
	 * @see com.nsk.common.trace.IfLogger#debug(java.lang.String)
	 */
	public void debug(String message) {
		logger.debug(message);
	}

	/**
	 * warn
	 * @see com.nsk.base.mid.java.common.util.trace.IfLogger#warning(java.lang.String)
	 */
	public void warn(String message) {
		logger.warn(message);
	}

	/**
	 * isDebugEnabled
	 * @see com.nsk.base.mid.java.common.util.trace.IfLogger#isDebugEnabled()
	 */
	public boolean isDebugEnabled() {
		return logger.isDebugEnabled();
	}

	//***** Protected method *****
	//***** Private method *****
	//***** Call back methods *****
	//***** Getter and Setter *****

}
